-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce sparsity patterns #139
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #139 +/- ##
==========================================
- Coverage 90.14% 87.20% -2.95%
==========================================
Files 38 39 +1
Lines 1614 1618 +4
==========================================
- Hits 1455 1411 -44
- Misses 159 207 +48 ☔ View full report in Codecov by Sentry. |
Benchmark resultJudge resultBenchmark Report for /home/runner/work/SparseConnectivityTracer.jl/SparseConnectivityTracer.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/SparseConnectivityTracer.jl/SparseConnectivityTracer.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/SparseConnectivityTracer.jl/SparseConnectivityTracer.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmarks show no regression and the only failing test is JET: I'm not sure what the issue is. EDIT: Should be fixed with ec8a9c3. |
src/patterns.jl
Outdated
## Fields | ||
$(TYPEDFIELDS) | ||
""" | ||
struct IndexSetVectorPattern{I<:Integer,S<:AbstractSet{I}} <: AbstractVectorPattern |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use this PR to remove AbstractSet
subtyping (because again, our custom types don't satisfy every assumption) and use duck-typing for that stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea is that stuff like DuplicateVector
gets to be a DuplicatePattern
in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay that's fair. But then we should temporarily remove it from the API if we're gonna change its place in the hierarchy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean before tagging a release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's not tag a release where DuplicateVector is an abstract set and then change it right away to a pattern
Let's drop I will merge this PR without input size information to avoid feature creep. However, I will refrain from tagging a release without it. |
* Add shared Hessian tracer à la Walther * Add identical objects test * Fixes for patterns introduced in #139 * Clarify connection between mutation and sharing --------- Co-authored-by: adrhill <[email protected]>
This is the second attempt at #114 after #119 got derailed by unrelated compile time issues.
This PR introduces
AbstractPattern
s that represent sparsity patterns:Over the last dozens of PRs, we've kept refactoring the Tracer type signatures to accommodate new representations for sparse vectors and sparse matrices, most notably:
AbstractSet
interface (Add RecursiveSet and DuplicateVector + better benchmarking of Brusselator #50)Advantages of introducing pattern types:
DictHessianPattern
s, which can't be split intogradient
andhessian
fields.AbstractSet
isn't enough, sinceAbstractSet
s can be used in an allocating or non-allocating manner.In 135, the proposed workaround was to introduce a new field to the
HessianTracer
struct. This is problematic for several reasons:Recommended reading order for reviews:
patterns.jl
tracers.jl